package com.antdesignbackend.backend.service.impl;

import com.antdesignbackend.backend.entity.Goods;
import com.antdesignbackend.backend.entity.entityVo.GoodsVo;
import com.antdesignbackend.backend.mapper.GoodsMapper;
import com.antdesignbackend.backend.service.GoodsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public List<GoodsVo> search(QueryWrapper<GoodsVo> queryWrapper, Page<GoodsVo> page) {
        return goodsMapper.search(queryWrapper, page);
    }
    @Override
    public Integer count(QueryWrapper<GoodsVo> queryWrapper) {
        return goodsMapper.count(queryWrapper);
    }
}
